package com.hainiu.cat.interview.chain;

import org.apache.commons.chain.Command;
import org.apache.commons.chain.Context;
import org.apache.commons.chain.Filter;

/**
 * create by biji.zhao on 2021/7/20
 */
// 交付
public class CloseSale implements Command, Filter {
    @Override
    public boolean execute(Context context) throws Exception {
        System.out.println("Thanks," + context.get("userName") + ",enjoying your driving");
        return false;
    }

    @Override
    public boolean postprocess(Context context, Exception e) {
        System.out.println("CloseSale postprocess ==================>");
        return false;
    }
}
